#cloud-config

# Hostname management
preserve_hostname: False
hostname: lb #update
fqdn: lb.{{ cluster_name }}.{{ domain }}

# Yum Repository


# Default Packages
#packages:
#  {% for package in install_packages -%}   
#  - {{ package }}
#  {% endfor -%} 
#{% endif %} 

# Groups
groups:
  - docker

# Users
users:
  - default
  - name: ocp
    ssh_authorized_keys:
    - {{ ssh_public_key }}
    groups: docker
    sudo: ['ALL=(ALL) NOPASSWD:ALL']

# Change password (Reference Only)
ssh_pwauth: True
chpasswd:
  list: |
    ocp:admin

# Remove cloud-init when finished with it
runcmd:
  - [ yum, -y, remove, cloud-init ]

# Configure where output will go
output:
  all: ">> /var/log/cloud-init.log"

# configure interaction with ssh server
ssh_svcname: ssh
ssh_deletekeys: True
ssh_genkeytypes: ['rsa', 'ecdsa']

# Install my public ssh key to the first user-defined user configured
# in cloud.cfg in the template (which is centos for CentOS cloud images)
ssh_authorized_keys:
  - {{ ssh_public_key }}

power_state:  
 delay: "now"  
 mode: reboot
